Skip to content

chore: Move common logic to shared package#325

Draft
hhvrc wants to merge 3 commits into
developfrom
feature/consume-internal-packages
Draft

chore: Move common logic to shared package#325
hhvrc wants to merge 3 commits into
developfrom
feature/consume-internal-packages

Conversation

@hhvrc

@hhvrc hhvrc commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

hhvrc and others added 2 commits June 22, 2026 17:24
…mon code

Replace the duplicated shared utility/validation/crypto/geo/dynamic-LINQ/
ASP.NET code in Common/ with references to the published packages
OpenShock.Internal.Common, OpenShock.Internal.AspNet and
OpenShock.Internal.DynamicLinq (pinned at 0.0.1).

- Delete 38 now-redundant files (exact duplicates + the PasswordHashingAlgorithm
  enum + the Cloudflare IP generation, now owned by the package).
- Re-point ~150 consumers to the OpenShock.Internal.* namespaces.
- OpenShockControllerBase now inherits the package base, keeping API-specific
  session/cookie/legacy-response helpers.
- Split HardLimits: shared limits come from the package, API-specific extras
  move to a new local ApiHardLimits.
- Split IQueryableExtensions: ApplyFilter/ApplyOrderBy from the package,
  WhereUserIdMatches/WhereIsUserOrPrivileged stay local.
- Adapt to package surface changes: CryptoUtils.RandomString rename,
  OpenShockProblem.WriteAsJsonAsync / OpenShockExceptionHandler now take
  JsonSerializerOptions (registered JsonOptions.Default in DI), ApplyOrderBy
  is now static.
- Bump BCrypt.Net-Next 4.2.0 -> 4.2.1 (required by OpenShock.Internal.Common).
- Drop the 6 Common.Tests files now covered by the packages' own test projects.
@hhvrc hhvrc self-assigned this Jun 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant